package com.exception.demo02;

public class Test {
    public static void main(String[] args) {
        try {
            test(12);
        } catch (MyException a) {
            System.out.println("MyException=>"+a);
        } finally {
        }
    }
    static void test(int a)throws MyException{
        System.out.println("传递的参数为"+a);
        if (a>10){
            throw new MyException(a);
        }
        System.out.println("Ok");
    }
}
